<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NumCpp: ReadMe.cpp</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NumCpp
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">A C++ implementation of the Python Numpy library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_read_me_8cpp-example.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ReadMe.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<p>Examples from the Quick Start Guide in README.md at <a href="https://github.com/dpilger26/NumCpp">GitHub Repository</a></p>
<div class="fragment"><div class="line"><span class="preprocessor">#include&quot;<a class="code" href="_num_cpp_8hpp.html">NumCpp.hpp</a>&quot;</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include&quot;boost/filesystem.hpp&quot;</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include&lt;iostream&gt;</span></div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line">    <span class="comment">// Containers</span></div><div class="line">    <a name="_a0"></a><a class="code" href="classnc_1_1_nd_array.html">nc::NdArray&lt;int&gt;</a> a0 = { {1, 2}, {3, 4} };</div><div class="line">    <a class="code" href="classnc_1_1_nd_array.html">nc::NdArray&lt;int&gt;</a> a1 = { {1, 2}, {3, 4}, {5, 6} };</div><div class="line">    a1.<a name="a1"></a><a class="code" href="classnc_1_1_nd_array.html#a59dbd6d99cded00a36b2dec0ecbfb4b7">reshape</a>(2, 3);</div><div class="line">    <span class="keyword">auto</span> a2 = a1.<a name="a2"></a><a class="code" href="classnc_1_1_nd_array.html#a89184343c8eef94fc7353a620aa2edfc">astype</a>&lt;<span class="keywordtype">double</span>&gt;();</div><div class="line"></div><div class="line">    <span class="comment">// Initializers</span></div><div class="line">    <span class="keyword">auto</span> a3 = nc::linspace&lt;int&gt;(1, 10, 5);</div><div class="line">    <span class="keyword">auto</span> a4 = nc::arange&lt;int&gt;(3, 7);</div><div class="line">    <span class="keyword">auto</span> a5 = nc::eye&lt;int&gt;(4);</div><div class="line">    <span class="keyword">auto</span> a6 = nc::zeros&lt;int&gt;(3, 4);</div><div class="line">    <span class="keyword">auto</span> a7 = <a class="code" href="classnc_1_1_nd_array.html">nc::NdArray&lt;int&gt;</a>(3, 4) = 0;</div><div class="line">    <span class="keyword">auto</span> a8 = nc::ones&lt;int&gt;(3, 4);</div><div class="line">    <span class="keyword">auto</span> a9 = <a class="code" href="classnc_1_1_nd_array.html">nc::NdArray&lt;int&gt;</a>(3, 4) = 1;</div><div class="line">    <span class="keyword">auto</span> a10 = <a name="a3"></a><a class="code" href="namespacenc.html#a2dcf31f9750195b5419ea2b62a1ccc86">nc::nans</a>(3, 4);</div><div class="line">    <span class="keyword">auto</span> a11 = <a name="_a4"></a><a class="code" href="classnc_1_1_nd_array.html">nc::NdArray&lt;double&gt;</a>(3, 4) = <a name="a5"></a><a class="code" href="namespacenc_1_1constants.html#af94758715a9a5157d7ca95ab89d390ac">nc::constants::nan</a>;</div><div class="line">    <span class="keyword">auto</span> a12 = nc::empty&lt;int&gt;(3, 4);</div><div class="line">    <span class="keyword">auto</span> a13 = <a class="code" href="classnc_1_1_nd_array.html">nc::NdArray&lt;int&gt;</a>(3, 4);</div><div class="line"></div><div class="line">    <span class="comment">// Slicing/Broadcasting</span></div><div class="line">    <span class="keyword">auto</span> a14 = nc::random::randInt&lt;int&gt;({ 10, 10 }, 0, 100);</div><div class="line">    <span class="keyword">auto</span> value = a14(2, 3);</div><div class="line">    <span class="keyword">auto</span> slice = a14({ 2, 5 }, { 2, 5 });</div><div class="line">    <span class="keyword">auto</span> rowSlice = a14(a14.<a name="a6"></a><a class="code" href="classnc_1_1_nd_array.html#aea1061c8c6954ca960412a7f4b323405">rSlice</a>(), 7);</div><div class="line">    <span class="keyword">auto</span> values = a14[a14 &gt; 50];</div><div class="line">    a14.<a name="a7"></a><a class="code" href="classnc_1_1_nd_array.html#a15899cfb75a560409f474826d960fec2">putMask</a>(a14 &gt; 50, 666);</div><div class="line"></div><div class="line">    <span class="comment">// random</span></div><div class="line">    <a name="a8"></a><a class="code" href="namespacenc_1_1random.html#ae71a0895ba1f3bff56f78300e3d8538a">nc::random::seed</a>(666);</div><div class="line">    <span class="keyword">auto</span> a15 = nc::random::randN&lt;double&gt;({3, 4});</div><div class="line">    <span class="keyword">auto</span> a16 = nc::random::randInt&lt;int&gt;({3, 4}, 0, 10);</div><div class="line">    <span class="keyword">auto</span> a17 = nc::random::rand&lt;double&gt;({3, 4});</div><div class="line">    <span class="keyword">auto</span> a18 = <a name="a9"></a><a class="code" href="namespacenc_1_1random.html#ad60ec32743642bd0540fec0076043fed">nc::random::choice</a>(a17, 3);</div><div class="line"></div><div class="line">    <span class="comment">// Concatenation</span></div><div class="line">    <span class="keyword">auto</span> a = nc::random::randInt&lt;int&gt;({3, 4}, 0, 10);</div><div class="line">    <span class="keyword">auto</span> b = nc::random::randInt&lt;int&gt;({3, 4}, 0, 10);</div><div class="line">    <span class="keyword">auto</span> <a name="a10"></a><a class="code" href="namespacenc_1_1constants.html#ac3fc62713ed109e451648c67faab7581">c</a> = nc::random::randInt&lt;int&gt;({3, 4}, 0, 10);</div><div class="line"></div><div class="line">    <span class="keyword">auto</span> a19 = <a name="a11"></a><a class="code" href="namespacenc.html#a656bb4b9fecf40f1f4194964be57c78b">nc::stack</a>({ a, b, <a class="code" href="namespacenc_1_1constants.html#ac3fc62713ed109e451648c67faab7581">c</a> }, <a name="a12"></a><a class="code" href="namespacenc.html#a5edb9ac6f596ae1256faa3f5d797dc84a54c1ed33c810f895d48c008d89f880b7">nc::Axis::ROW</a>);</div><div class="line">    <span class="keyword">auto</span> a20 = <a name="a13"></a><a class="code" href="namespacenc.html#a8dec1ff4db1d89ab4b3a7d32ff4b5cf3">nc::vstack</a>({ a, b, <a class="code" href="namespacenc_1_1constants.html#ac3fc62713ed109e451648c67faab7581">c</a> });</div><div class="line">    <span class="keyword">auto</span> a21 = <a name="a14"></a><a class="code" href="namespacenc.html#a80a6677582b65c19750b0d82ac182081">nc::hstack</a>({ a, b, <a class="code" href="namespacenc_1_1constants.html#ac3fc62713ed109e451648c67faab7581">c</a> });</div><div class="line">    <span class="keyword">auto</span> a22 = <a name="a15"></a><a class="code" href="namespacenc.html#a95328595c782582b1e75e1c12e92bd81">nc::append</a>(a, b, <a name="a16"></a><a class="code" href="namespacenc.html#a5edb9ac6f596ae1256faa3f5d797dc84aa44a065875f5d66d41474bb9bfb0ce05">nc::Axis::COL</a>);</div><div class="line"></div><div class="line">    <span class="comment">// Diagonal, Traingular, and Flip</span></div><div class="line">    <span class="keyword">auto</span> d = nc::random::randInt&lt;int&gt;({5, 5}, 0, 10);</div><div class="line">    <span class="keyword">auto</span> a23 = <a name="a17"></a><a class="code" href="namespacenc.html#ae7bb84601bd94086fe853474fa35fb64">nc::diagonal</a>(d);</div><div class="line">    <span class="keyword">auto</span> a24 = <a name="a18"></a><a class="code" href="namespacenc.html#acc5de905ab2bb273cb01a4fd3fd357df">nc::triu</a>(a);</div><div class="line">    <span class="keyword">auto</span> a25 = <a name="a19"></a><a class="code" href="namespacenc.html#ad9192133ab234457a9e9a5269b88865b">nc::tril</a>(a);</div><div class="line">    <span class="keyword">auto</span> a26 = <a name="a20"></a><a class="code" href="namespacenc.html#a99283060a7a0cdfeb339a22e6c073f40">nc::flip</a>(d, <a class="code" href="namespacenc.html#a5edb9ac6f596ae1256faa3f5d797dc84a54c1ed33c810f895d48c008d89f880b7">nc::Axis::ROW</a>);</div><div class="line">    <span class="keyword">auto</span> a27 = <a name="a21"></a><a class="code" href="namespacenc.html#a9580ced05ab14bbec720b59b227fbb33">nc::flipud</a>(d);</div><div class="line">    <span class="keyword">auto</span> a28 = <a name="a22"></a><a class="code" href="namespacenc.html#a082c6a041487d4eaaaab8dd5661f6a49">nc::fliplr</a>(d);</div><div class="line"></div><div class="line">    <span class="comment">// iteration</span></div><div class="line">    <span class="keywordflow">for</span> (<span class="keyword">auto</span> it = a.begin(); it &lt; a.end(); ++it)</div><div class="line">    {</div><div class="line">        std::cout &lt;&lt; *it &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div><div class="line">    }</div><div class="line">    std::cout &lt;&lt; std::endl;</div><div class="line"></div><div class="line">    <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; arrayValue : a)</div><div class="line">    {</div><div class="line">        std::cout &lt;&lt; arrayValue &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div><div class="line">    }</div><div class="line">    std::cout &lt;&lt; std::endl;</div><div class="line"></div><div class="line">    <span class="comment">// Logical</span></div><div class="line">    <span class="keyword">auto</span> a29 = <a name="a23"></a><a class="code" href="namespacenc.html#ac0af750215d0444ad9f0208620ca206b">nc::where</a>(a &gt; 5, a, b);</div><div class="line">    <span class="keyword">auto</span> a30 = <a name="a24"></a><a class="code" href="namespacenc.html#a81876a5a1673abc6c129095e8e9f9309">nc::any</a>(a);</div><div class="line">    <span class="keyword">auto</span> a31 = <a name="a25"></a><a class="code" href="namespacenc.html#a1448a11e7f7aa4a77d8250ca9b3d27cd">nc::all</a>(a);</div><div class="line">    <span class="keyword">auto</span> a32 = <a name="a26"></a><a class="code" href="namespacenc.html#a951c3f9acd6147a8e2be1ab2cda4d51c">nc::logical_and</a>(a, b);</div><div class="line">    <span class="keyword">auto</span> a33 = <a name="a27"></a><a class="code" href="namespacenc.html#a0492e302b114ab15b996b1330604478b">nc::logical_or</a>(a, b);</div><div class="line">    <span class="keyword">auto</span> a34 = <a name="a28"></a><a class="code" href="namespacenc.html#ae80bdb1c4ce59e2a74cad2d518f50e1e">nc::isclose</a>(a, b);</div><div class="line">    <span class="keyword">auto</span> a35 = <a name="a29"></a><a class="code" href="namespacenc.html#ac2a107bb7ecfcf649c408069166ed1ea">nc::allclose</a>(a, b);</div><div class="line"></div><div class="line">    <span class="comment">// Comparisons</span></div><div class="line">    <span class="keyword">auto</span> a36 = <a name="a30"></a><a class="code" href="namespacenc.html#a7440518ae70823ac15ea1711d8df7bfc">nc::equal</a>(a, b);</div><div class="line">    <span class="keyword">auto</span> a37 = a == b;</div><div class="line">    <span class="keyword">auto</span> a38 = <a name="a31"></a><a class="code" href="namespacenc.html#ac6c0da616068bc667891c0a460431de3">nc::not_equal</a>(a, b);</div><div class="line">    <span class="keyword">auto</span> a39 = a != b;</div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef __cpp_structured_bindings</span></div><div class="line">    <span class="keyword">auto</span> [rows, cols] = <a name="a32"></a><a class="code" href="namespacenc.html#adda26afad96d27aed7db0fa5ec818d4f">nc::nonzero</a>(a);</div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line">    <span class="comment">// Minimum, Maximum, Sorting</span></div><div class="line">    <span class="keyword">auto</span> value1 = <a name="a33"></a><a class="code" href="namespacenc.html#a1dcd97ed6259f6a019ff8b59f2ae1adc">nc::min</a>(a);</div><div class="line">    <span class="keyword">auto</span> value2 = <a name="a34"></a><a class="code" href="namespacenc.html#a5273d0dac1896f082d185c7f0b90d99f">nc::max</a>(a);</div><div class="line">    <span class="keyword">auto</span> value3 = <a name="a35"></a><a class="code" href="namespacenc.html#a32979f396f8a8c499f30f53341374697">nc::argmin</a>(a);</div><div class="line">    <span class="keyword">auto</span> value4 = <a name="a36"></a><a class="code" href="namespacenc.html#a2185848c4b822d5636fad30c3eda6275">nc::argmax</a>(a);</div><div class="line">    <span class="keyword">auto</span> a41 = <a name="a37"></a><a class="code" href="namespacenc.html#a31771e9950ef3c2aba7582700de304dd">nc::sort</a>(a, <a class="code" href="namespacenc.html#a5edb9ac6f596ae1256faa3f5d797dc84a54c1ed33c810f895d48c008d89f880b7">nc::Axis::ROW</a>);</div><div class="line">    <span class="keyword">auto</span> a42 = <a name="a38"></a><a class="code" href="namespacenc.html#ad5510f8aa54a5ed677e82fbe2c378b84">nc::argsort</a>(a, <a class="code" href="namespacenc.html#a5edb9ac6f596ae1256faa3f5d797dc84aa44a065875f5d66d41474bb9bfb0ce05">nc::Axis::COL</a>);</div><div class="line">    <span class="keyword">auto</span> a43 = <a name="a39"></a><a class="code" href="namespacenc.html#ab254accc5490d12c7d2b396345c50493">nc::unique</a>(a);</div><div class="line">    <span class="keyword">auto</span> a44 = <a name="a40"></a><a class="code" href="namespacenc.html#adb6b7ca658c4d613fe0c4a695ba3542b">nc::setdiff1d</a>(a, b);</div><div class="line">    <span class="keyword">auto</span> a45 = <a name="a41"></a><a class="code" href="namespacenc.html#aca24655977cb03ca84ef20aebae3e78f">nc::diff</a>(a);</div><div class="line"></div><div class="line">    <span class="comment">// Reducers</span></div><div class="line">    <span class="keyword">auto</span> value5 = nc::sum&lt;int&gt;(a);</div><div class="line">    <span class="keyword">auto</span> a46 = nc::sum&lt;int&gt;(a, <a class="code" href="namespacenc.html#a5edb9ac6f596ae1256faa3f5d797dc84a54c1ed33c810f895d48c008d89f880b7">nc::Axis::ROW</a>);</div><div class="line">    <span class="keyword">auto</span> value6 = nc::prod&lt;int&gt;(a);</div><div class="line">    <span class="keyword">auto</span> a47 = nc::prod&lt;int&gt;(a, <a class="code" href="namespacenc.html#a5edb9ac6f596ae1256faa3f5d797dc84a54c1ed33c810f895d48c008d89f880b7">nc::Axis::ROW</a>);</div><div class="line">    <span class="keyword">auto</span> value7 = <a name="a42"></a><a class="code" href="namespacenc.html#aff3ef2c818346b63714ca4f3493f0ec9">nc::mean</a>(a);</div><div class="line">    <span class="keyword">auto</span> a48 = <a class="code" href="namespacenc.html#aff3ef2c818346b63714ca4f3493f0ec9">nc::mean</a>(a, <a class="code" href="namespacenc.html#a5edb9ac6f596ae1256faa3f5d797dc84a54c1ed33c810f895d48c008d89f880b7">nc::Axis::ROW</a>);</div><div class="line">    <span class="keyword">auto</span> value8 = <a name="a43"></a><a class="code" href="namespacenc.html#a5411a4d115e6a44f6d6dcedc2635d085">nc::count_nonzero</a>(a);</div><div class="line">    <span class="keyword">auto</span> a49 = <a class="code" href="namespacenc.html#a5411a4d115e6a44f6d6dcedc2635d085">nc::count_nonzero</a>(a, <a class="code" href="namespacenc.html#a5edb9ac6f596ae1256faa3f5d797dc84a54c1ed33c810f895d48c008d89f880b7">nc::Axis::ROW</a>);</div><div class="line"></div><div class="line">    <span class="comment">// I/O</span></div><div class="line">    a.print();</div><div class="line">    std::cout &lt;&lt; a &lt;&lt; std::endl;</div><div class="line"></div><div class="line">    <span class="keyword">auto</span> tempDir = boost::filesystem::temp_directory_path();</div><div class="line">    <span class="keyword">auto</span> tempTxt = (tempDir / <span class="stringliteral">&quot;temp.txt&quot;</span>).<span class="keywordtype">string</span>();</div><div class="line">    a.tofile(tempTxt, <span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line">    <span class="keyword">auto</span> a50 = nc::fromfile&lt;int&gt;(tempTxt, <span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"></div><div class="line">    <span class="keyword">auto</span> tempBin = (tempDir / <span class="stringliteral">&quot;temp.bin&quot;</span>).<span class="keywordtype">string</span>();</div><div class="line">    <a name="a44"></a><a class="code" href="namespacenc.html#af6e71bd96dbc78f9ca018d2da0a7e653">nc::dump</a>(a, tempBin);</div><div class="line">    <span class="keyword">auto</span> a51 = nc::load&lt;int&gt;(tempBin);</div><div class="line"></div><div class="line">    <span class="comment">// Mathematical Functions</span></div><div class="line"></div><div class="line">    <span class="comment">// Basic Functions</span></div><div class="line">    <span class="keyword">auto</span> a52 = <a name="a45"></a><a class="code" href="namespacenc.html#a4a45571b060fcb2c3e323fb8f8d7b00e">nc::abs</a>(a);</div><div class="line">    <span class="keyword">auto</span> a53 = <a name="a46"></a><a class="code" href="namespacenc.html#a4a5d98f334e0b50a3cf9c2718485e5e9">nc::sign</a>(a);</div><div class="line">    <span class="keyword">auto</span> a54 = <a name="a47"></a><a class="code" href="namespacenc.html#a12bfc5b4d937aa0366b70fb15270bd41">nc::remainder</a>(a, b);</div><div class="line">    <span class="keyword">auto</span> a55 = <a name="a48"></a><a class="code" href="namespacenc.html#a6f71d75583176a599a64647109170a08">nc::clip</a>(a, 3, 8);</div><div class="line">    <span class="keyword">auto</span> xp = nc::linspace&lt;double&gt;(0.0, 2.0 * <a name="a49"></a><a class="code" href="namespacenc_1_1constants.html#a2f1219a120c9cc1434486d9de75a8221">nc::constants::pi</a>, 100);</div><div class="line">    <span class="keyword">auto</span> fp = <a name="a50"></a><a class="code" href="namespacenc.html#a0d66dc207eb871bba26bff4838992fef">nc::sin</a>(xp);</div><div class="line">    <span class="keyword">auto</span> x = nc::linspace&lt;double&gt;(0.0, 2.0 * <a class="code" href="namespacenc_1_1constants.html#a2f1219a120c9cc1434486d9de75a8221">nc::constants::pi</a>, 1000);</div><div class="line">    <span class="keyword">auto</span> <a name="a51"></a><a class="code" href="namespacenc_1_1random.html#a00229c23da25284daf436c0a338ea25c">f</a> = <a name="a52"></a><a class="code" href="namespacenc.html#a5b9584eeac344f9d37beb6be475300ca">nc::interp</a>(x, xp, fp);</div><div class="line"></div><div class="line">    <span class="comment">// Exponential Functions</span></div><div class="line">    <span class="keyword">auto</span> a56 = <a name="a53"></a><a class="code" href="namespacenc.html#ab138b681799463226a8ef60f87d30ac7">nc::exp</a>(a);</div><div class="line">    <span class="keyword">auto</span> a57 = <a name="a54"></a><a class="code" href="namespacenc.html#a390dd897c7e7335baf71396e3c807c47">nc::expm1</a>(a);</div><div class="line">    <span class="keyword">auto</span> a58 = <a name="a55"></a><a class="code" href="namespacenc.html#afe601bfe09694a30d40e5778de8fb5e7">nc::log</a>(a);</div><div class="line">    <span class="keyword">auto</span> a59 = <a name="a56"></a><a class="code" href="namespacenc.html#af62a0af0394ed6cd4f523f222e7f27ef">nc::log1p</a>(a);</div><div class="line"></div><div class="line">    <span class="comment">// Power Functions</span></div><div class="line">    <span class="keyword">auto</span> a60 = nc::power&lt;int&gt;(a, 4);</div><div class="line">    <span class="keyword">auto</span> a61 = <a name="a57"></a><a class="code" href="namespacenc.html#acb264011e6e6cd182cc47f67018a6b3c">nc::sqrt</a>(a);</div><div class="line">    <span class="keyword">auto</span> a62 = <a name="a58"></a><a class="code" href="namespacenc.html#a282e72a93afe2e6554e0f17f21dd7b9e">nc::square</a>(a);</div><div class="line">    <span class="keyword">auto</span> a63 = <a name="a59"></a><a class="code" href="namespacenc.html#a21de0caa1ff8e9e7baed8a8a57f7bcab">nc::cbrt</a>(a);</div><div class="line"></div><div class="line">    <span class="comment">// Trigonometric Functions</span></div><div class="line">    <span class="keyword">auto</span> a64 = <a class="code" href="namespacenc.html#a0d66dc207eb871bba26bff4838992fef">nc::sin</a>(a);</div><div class="line">    <span class="keyword">auto</span> a65 = <a name="a60"></a><a class="code" href="namespacenc.html#affd0f5b31b2bd1b9cea9ab54e25dfab2">nc::cos</a>(a);</div><div class="line">    <span class="keyword">auto</span> a66 = <a name="a61"></a><a class="code" href="namespacenc.html#a12bb2c0891c334e603cd1510facba22a">nc::tan</a>(a);</div><div class="line"></div><div class="line">    <span class="comment">// Hyperbolic Functions</span></div><div class="line">    <span class="keyword">auto</span> a67 = <a name="a62"></a><a class="code" href="namespacenc.html#ab095a894082329d4a43e38bce13d7ff4">nc::sinh</a>(a);</div><div class="line">    <span class="keyword">auto</span> a68 = <a name="a63"></a><a class="code" href="namespacenc.html#a201b05754dd9d5824747251770b285e6">nc::cosh</a>(a);</div><div class="line">    <span class="keyword">auto</span> a69 = <a name="a64"></a><a class="code" href="namespacenc.html#a41bb95f5d62c593e84a9c97013d01bea">nc::tanh</a>(a);</div><div class="line"></div><div class="line">    <span class="comment">// Classification Functions</span></div><div class="line">    <span class="keyword">auto</span> a70 = <a name="a65"></a><a class="code" href="namespacenc.html#ac28569da874c0b37a4c50c86b31a98ab">nc::isnan</a>(a.astype&lt;<span class="keywordtype">double</span>&gt;());</div><div class="line">    <span class="comment">//nc::isinf(a);</span></div><div class="line"></div><div class="line">    <span class="comment">// Linear Algebra</span></div><div class="line">    <span class="keyword">auto</span> a71 = nc::norm&lt;int&gt;(a);</div><div class="line">    <span class="keyword">auto</span> a72 = nc::dot&lt;int&gt;(a, b.transpose());</div><div class="line"></div><div class="line">    <span class="keyword">auto</span> a73 = nc::random::randInt&lt;int&gt;({3, 3}, 0, 10);</div><div class="line">    <span class="keyword">auto</span> a74 = nc::random::randInt&lt;int&gt;({4, 3}, 0, 10);</div><div class="line">    <span class="keyword">auto</span> a75 = nc::random::randInt&lt;int&gt;({1, 4}, 0, 10);</div><div class="line">    <span class="keyword">auto</span> value9 = <a name="a66"></a><a class="code" href="namespacenc_1_1linalg.html#a55bafcebbc897458164e8dc511b6119c">nc::linalg::det</a>(a73);</div><div class="line">    <span class="keyword">auto</span> a76 = <a name="a67"></a><a class="code" href="namespacenc_1_1linalg.html#ae36553eb100d8f2c2167e8ecadf2a9fc">nc::linalg::inv</a>(a73);</div><div class="line">    <span class="keyword">auto</span> a77 = <a name="a68"></a><a class="code" href="namespacenc_1_1linalg.html#aac53030577bdcf972d77f0c528b2d302">nc::linalg::lstsq</a>(a74, a75);</div><div class="line">    <span class="keyword">auto</span> a78 = nc::linalg::matrix_power&lt;int&gt;(a73, 3);</div><div class="line">    <span class="keyword">auto</span> a79 = nc::linalg::multi_dot&lt;int&gt;({ a, b.transpose(), <a class="code" href="namespacenc_1_1constants.html#ac3fc62713ed109e451648c67faab7581">c</a> });</div><div class="line"></div><div class="line">    <a class="code" href="classnc_1_1_nd_array.html">nc::NdArray&lt;double&gt;</a> u;</div><div class="line">    <a class="code" href="classnc_1_1_nd_array.html">nc::NdArray&lt;double&gt;</a> s;</div><div class="line">    <a class="code" href="classnc_1_1_nd_array.html">nc::NdArray&lt;double&gt;</a> vt;</div><div class="line">    <a name="a69"></a><a class="code" href="namespacenc_1_1linalg.html#aa2a95731baaa5ff4d5837c601987af22">nc::linalg::svd</a>(a.astype&lt;<span class="keywordtype">double</span>&gt;(), u, s, vt);</div><div class="line"></div><div class="line">    <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
